package com.vic.test.designpattern._2proxypattern.staticproxy;

import com.vic.test.designpattern._2proxypattern.IUser;

public class UserDaoProxy implements IUser {
    private IUser  target;

    public UserDaoProxy(IUser target){
        this.target = target;
    }

    @Override
    public void save() {
        System.out.println("---开始事务----");
        target.save();
        System.out.println("---结束事务-----");
    }

}
